<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>80386 Programmer's Reference Manual -- Opcode SAHF</TITLE>
</HEAD>
<BODY STYLE="width:80ch">
<B>up:</B> <A HREF="c17.htm">
Chapter 17 -- 80386 Instruction Set</A><BR>
<B>prev:</B><A HREF="RET.htm"> RET Return from Procedure</A><BR>
<B>next:</B><A HREF="SAL.htm"> SAL/SAR/SHL/SHR Shift Instructions</A>
<P>
<HR>
<P>
<H1>SAHF -- Store AH into Flags</H1>

<PRE>
Opcode  Instruction  Clocks   Description

9E      SAHF         3        Store AH into flags SF ZF xx AF xx PF xx CF
</PRE>

<H2>Operation</H2>

<PRE>
SF:ZF:xx:AF:xx:PF:xx:CF := AH;
</PRE>

<H2>Description</H2>

SAHF loads the flags listed above with values from the AH register,
from bits 7, 6, 4, 2, and 0, respectively.

<H2>Flags Affected</H2>

SF, ZF, AF, PF, and CF as described above

<H2>Protected Mode Exceptions</H2>

None

<H2>Real Address Mode Exceptions</H2>

None

<H2>Virtual 8086 Mode Exceptions</H2>

None


<P>
<HR>
<P>
<B>up:</B> <A HREF="c17.htm">
Chapter 17 -- 80386 Instruction Set</A><BR>
<B>prev:</B><A HREF="RET.htm"> RET Return from Procedure</A><BR>
<B>next:</B><A HREF="SAL.htm"> SAL/SAR/SHL/SHR Shift Instructions</A>
</BODY>
